package service.jsrAnotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import service.IOCInsertType.MessageService;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Description ${DESCRIPTION}.
 * @author: wwchen
 * @DateTime: 2018-05-13 10:37
 */
@Component
public class HelloWorld {
    @Autowired
    private MessageService messageService;

    public void printMessage(){
        messageService.getMessage("jsr注解demo ");
    }
    @PostConstruct
    public void init(){
        System.out.println("Bean is going through init.");
    }
    @PreDestroy
    public void destroy(){
        System.out.println("Bean will destroy now.");
    }
}
